(define-macro/err (set-var-assign/and-aux handle-and)
  `(cond
    ((eq? and-st '变量&表达式)
     (append-new-coding-atexp fn '全局变量 0 st res-str))
    (else
     (exit-handle-and (list 'err i 'handle-and (format "&表达式[~a]状态非法。" and-st)))
     )))

(def/err (handle-and s n fn par)
  (let ((and-st #f)
	)
    ;;(y-or-n "handle-and:loc=~a,c=~a\n" loc (string-ref s n))
    (tr-string (i ch s n)
	       (cond
		((rd-and-deli ch)
		 (if and-st
		     (exit-handle-and (list res-str (- i 1) and-st))
		     (begin
		       (set! res-str "#%系统缺省值")
		       (set! st '系统值常量)
		       (set! and-st '变量&表达式)
		       (run/err set-var-assign/and-aux)
		       (exit-handle-and (list res-str (- n 1) and-st)))))
		((char=? ch #\#)
		  (let-set! (res-str i st)(run/err get-cons s i))
		  (if (st-is st '赋值常量)
		      (begin
			(if (not and-st)
			    (begin
			      (set! and-st '变量&表达式)
			      (run/err set-var-assign/and-aux))
			    (if (eq? and-st '变量&表达式)
				(run/err set-var-assign/and-aux)
				(if (eq? and-st '函数缺省值&表达式)
				    (run/err set-func-assign/and-aux)
				    (exit-handle-and (list 'err i 'handle-and (format "&表达式状态[~a]非法。" and-st)))
				    )
				)
			))
		      (exit-handle-and (list 'err i 'handle-and (format "非赋值常量[~a],不可以作为变量&表达式取值取值(#常量)." st)))))
		((char=? ch #\@)
		 (set! and-st '符号引用&表达式))
		((char=? ch #\()
		 (set! and-st '函数缺省值&表达式))
		
		((char=? ch #\")
		 (let-set! (res-str i st)(run/err get-str s i))
		 (if (eq? st '字符串)
		     (begin
		       (if (not and-st)
			   (begin
			     (set! and-st '变量&表达式)
			     (run/err set-var-assign/at-aux)
			     )
			   (if (eq? and-st '变量&表达式)
			       (run/err set-var-assign/and-aux)
			       (if (eq? and-st '函数缺省值&表达式)
				   (run/err set-func-assign/and-aux)
				   (exit-handle-and (list 'err i 'handle-and (format "&表达式状态[~a]非法。" and-st)))
				   )
			       )
			   ))
		     (exit-handle-and (list 'err i 'handle-and (format "非赋值常量[~a],不可以作为变量&表达式取值(字符串)." st)))))
		(else
		 (let-set! (res-str i st)(run/err get-sym-or-num s i))
		 (if (or (eq? st '整数)(eq? st '小数)(eq? st '分数)(eq? st '指数数))
		     (begin
		       (if (not and-st)
			   (begin
			     (set! and-st '变量&表达式)
			     (run/err set-var-assign/and-aux)
			     )
			   (if (eq? and-st '变量&表达式)
			       (run/err set-var-assign/and-aux)
			       (if (eq? and-st '函数缺省值&表达式)
				   (run/err set-func-assign/and-aux)
				   (exit-handle-and (list 'err i 'handle-and (format "&表达式数据状态[~a]非法(数值)。" and-st)))
				   )
			       )
			   ))
		     (if (and (eq? and-st '符号引用&表达式)(eq? st '词语))
			 (begin
			   (run/err set-func-assign/and-aux)
			   )
			 (exit-handle-and (list 'err i 'handle-and (format "非赋值常量[~a],不可以作为变量&表达式取值(数值)." st))))))
		))
    (exit-handle-and (list res-str (string-length s) and-st))))

(define-macro/err (set-func-assign/and-aux handle-and)
  `(cond
    ((eq? and-st '函数缺省值&表达式)
     (if (= par 0)
	 (append-new-coding-atexp fn '无参函数 par st res-str)
	 (append-new-coding-atexp fn '函数 par st res-str)))
    ((eq? and-st '符号引用&表达式)
     (push (list cyl-current-define-function-name res-str fn) cyl-reg-list)
     ;;(let-set! (src-sym src-fn src-path) (get-last-symbol-from-loc res-str fn))
     (if (eq? cyl-define-status 'func-define)
	 (push (list fn '局部别名 0 0 0 '位置 (reg-outsymbol (list fn res-str))) cyl-local-symbol-dict-list)
	 (push (list fn '全局别名 0 0 0 '位置 (reg-outsymbol (list fn res-str))) cyl-current-symbol-dict-list))
     )))


     
	
